package zero.tech.wsnet.common;

import zero.tech.core.data.Resp;
import zero.tech.core.work.QueueWork;
import zero.tech.wsnet.data.Message;
import zero.tech.wsnet.node.NodeClient;

public abstract class ResNodeQueueProcess extends QueueWork {
	private Message message;
	private NodeClient client;

	@Override
	public void init(Object... objs) throws Exception {
		this.message = (Message) objs[0];
		this.client = (NodeClient) objs[1];
	}

	public abstract void process(NodeClient webClient, Resp param);

	@Override
	public void run() {
		process(client, this.message.getData());
	}
}
